package com.fanrui.code.socket.netty.core;

import com.fanrui.code.util.logger.Stdout;

import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;

public class InboundExceptionLogHandler implements ChannelHandler {

	@Override
	public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
		Stdout.GET().error("入站异常", cause);
		cause.printStackTrace();
	}

	@Override
	public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
	}

	@Override
	public void handlerRemoved(ChannelHandlerContext ctx) throws Exception {
	}
}

